package com.yiwyn.Behavioral.cor.pro.handle;

import com.yiwyn.Behavioral.cor.pro.domain.Contract;
import com.yiwyn.Behavioral.cor.pro.exception.CtrctException;
import com.yiwyn.Behavioral.cor.pro.handle.base.AbstractContractHandle;

public class WaterMarkHandle implements AbstractContractHandle {

    private static WaterMarkHandle instance;

    public static WaterMarkHandle getInstance() {
        if (instance == null) {
            return new WaterMarkHandle();
        }
        return instance;
    }

    @Override
    public void doHandle(Contract contract) throws CtrctException {
        contract.setWatermark("Yiwyn's spring demo");
    }
}
